﻿
using Admin.NET.Application.Entity;
using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 模板预警基础输入参数
    /// </summary>
    public class DeiviceTemplateTriggerBaseInput
    {
        /// <summary>
        /// 触发器名
        /// </summary>
        public virtual string TriggerName { get; set; }
        
        /// <summary>
        /// 触发类型
        /// </summary>
        public virtual TriggerType TriggerType { get; set; }
        
        /// <summary>
        /// 从机变量
        /// </summary>
        public virtual long TemplatePointId { get; set; }
        
        /// <summary>
        /// 触发条件
        /// </summary>
        public virtual TriggerCondition TriggerCondition { get; set; }
        
        /// <summary>
        /// 是否预警
        /// </summary>
        public virtual bool Status { get; set; }
        
        /// <summary>
        /// 报警抓拍
        /// </summary>
        public virtual bool Capture { get; set; }
        
        /// <summary>
        /// 报警推送内容
        /// </summary>
        public virtual string? CustomContentAlarm { get; set; }
        
        /// <summary>
        /// 报警恢复推送内容
        /// </summary>
        public virtual string? CustomContentNormal { get; set; }
        
        /// <summary>
        /// 是否联动
        /// </summary>
        public virtual bool LinkageControlStatus { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        public virtual string? Remark { get; set; }
        
        /// <summary>
        /// 联动类型
        /// </summary>
        public virtual ControlType ControlType { get; set; }
        
        /// <summary>
        /// 发送类型
        /// </summary>
        public virtual LinkageControlSendType LinkageControlSendType { get; set; }
        
        /// <summary>
        /// 联动的变量
        /// </summary>
        public virtual long ControlTemplatePointId { get; set; }
        
        /// <summary>
        /// 下发数据
        /// </summary>
        public virtual string? ControlSendData { get; set; }
        
        /// <summary>
        /// 最大值
        /// </summary>
        public virtual Single? Max { get; set; }
        
        /// <summary>
        /// 最小值
        /// </summary>
        public virtual Single? Min { get; set; }
        
        /// <summary>
        /// 报警死区
        /// </summary>
        public virtual Single? DeadZone { get; set; }
        
        /// <summary>
        /// 创建者部门Id
        /// </summary>
        public virtual long? CreateOrgId { get; set; }
        
        /// <summary>
        /// 创建者部门名称
        /// </summary>
        public virtual string? CreateOrgName { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime? CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public virtual DateTime? UpdateTime { get; set; }
        
        /// <summary>
        /// 创建者Id
        /// </summary>
        public virtual long? CreateUserId { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者Id
        /// </summary>
        public virtual long? UpdateUserId { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        public virtual bool IsDelete { get; set; }
        
    }

    /// <summary>
    /// 模板预警分页查询输入参数
    /// </summary>
    public class PageDeiviceTemplateTriggerInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 触发器名
        /// </summary>
        public string? TriggerName { get; set; }
        
        /// <summary>
        /// 触发类型
        /// </summary>
        public TriggerType? TriggerType { get; set; }
        
        /// <summary>
        /// 从机变量
        /// </summary>
        public long? TemplatePointId { get; set; }
        
        /// <summary>
        /// 触发条件
        /// </summary>
        public TriggerCondition? TriggerCondition { get; set; }
        
        /// <summary>
        /// 报警抓拍
        /// </summary>
        public bool? Capture { get; set; }
        
        /// <summary>
        /// 联动类型
        /// </summary>
        public ControlType? ControlType { get; set; }
        
        /// <summary>
        /// 创建者部门Id
        /// </summary>
        public long? CreateOrgId { get; set; }
        
    }

    /// <summary>
    /// 模板预警增加输入参数
    /// </summary>
    public class AddDeiviceTemplateTriggerInput : DeiviceTemplateTriggerBaseInput
    {
        /// <summary>
        /// 触发器名
        /// </summary>
        [Required(ErrorMessage = "触发器名不能为空")]
        public override string TriggerName { get; set; }
        
        /// <summary>
        /// 触发类型
        /// </summary>
        [Required(ErrorMessage = "触发类型不能为空")]
        public override TriggerType TriggerType { get; set; }
        
        /// <summary>
        /// 从机变量
        /// </summary>
        [Required(ErrorMessage = "从机变量不能为空")]
        public override long TemplatePointId { get; set; }
        
        /// <summary>
        /// 触发条件
        /// </summary>
        [Required(ErrorMessage = "触发条件不能为空")]
        public override TriggerCondition TriggerCondition { get; set; }
        
        /// <summary>
        /// 是否预警
        /// </summary>
        [Required(ErrorMessage = "是否预警不能为空")]
        public override bool Status { get; set; }
        
        /// <summary>
        /// 报警抓拍
        /// </summary>
        [Required(ErrorMessage = "报警抓拍不能为空")]
        public override bool Capture { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        [Required(ErrorMessage = "软删除不能为空")]
        public override bool IsDelete { get; set; }
        
    }

    /// <summary>
    /// 模板预警删除输入参数
    /// </summary>
    public class DeleteDeiviceTemplateTriggerInput : BaseIdInput
    {
    }

    /// <summary>
    /// 模板预警更新输入参数
    /// </summary>
    public class UpdateDeiviceTemplateTriggerInput : DeiviceTemplateTriggerBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 模板预警主键查询输入参数
    /// </summary>
    public class QueryByIdDeiviceTemplateTriggerInput : DeleteDeiviceTemplateTriggerInput
    {

    }
